#include "stack.h"

template<class T>
Stack<T>::Stack(int sizeValue)
{
	size = sizeValue > 0 ? sizeValue : 10;
	top = -1;
	stackPtr = new T[size];
}

template<class T>
bool Stack<T>::push(const T &pushValue)
{
	if( !isFull() )
	{
		stackPtr[++top] = pushValue;
		return true;
	}
	return false;
}
template<class T>
bool Stack<T>::pop(T &popValue)
{
	if( !isEmpty() )
	{
		popValue = stackPtr[top--];
		return true;
	}
	return false;
}

